package org.github.manx98.jlibhac.tools.es;

/**
 * @author Manx98
 * @version 1.0
 * @since 2022/10/3 17:36
 */
public enum TicketSigType {
    Rsa4096Sha1(0x10000),
    Rsa2048Sha1(0x10001),
    EcdsaSha1(0x10002),
    Rsa4096Sha256(0x10003),
    Rsa2048Sha256(0x10004),
    EcdsaSha256(0x10005);

    public final int value;

    TicketSigType(int value) {
        this.value = value;
    }

    public static TicketSigType valueOf(int value) {
        for (TicketSigType ticketSigType : values()) {
            if (ticketSigType.value == value) {
                return ticketSigType;
            }
        }
        throw new IllegalArgumentException("Invalid TicketSigType value: " + value);
    }
}
